#!/usr/bin/env python
import os, sys
import screens
import config
from assignControls import *
from Engine import graphics, engine
from objects import controls
import screensdata

def start(curscreen=0):
    """Main stuff, Runs Engine.graphics then loads screens data.
    Then runs Engine.engine."""
    version = config.getVersion()
    author=config.getAuthor()
    name = config.getName()
    screenwidth = config.getWidth()
    screenheight = config.getHeight()

    window=graphics.initgraphics(version, screenheight, screenwidth)

    #the array of the screens
    characters = assignControls()#this is not the final but just there to get it working
    
    screens = screensdata.getscreens(window, characters).screens
    
    if curscreen == 0:
        curscreen = config.getCurScreen()
    engine.engine(screens, curscreen)

if __name__ == '__main__':
    start(1)